package jp.ac.u_tokyo.dch.model.xml;

import java.util.ArrayList;
import java.util.List;

import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.Root;

@Root(name= "line")
public class Line {

	@Attribute(name = "key", required=false)
	private String key;
	@Attribute(name="displayname", required=false)
	private String displayname;

	@ElementList(inline= true, required= false)
	private List<Item> itemList;

	public Line() {
		itemList = new ArrayList<Item>();
	}

	public void addItem(Item item) {

		itemList.add(item);
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public List<Item> getItemList() {
		return itemList;
	}

	public void setItemList(List<Item> itemList) {
		this.itemList = itemList;
	}

	public String getDisplayname() {
		return displayname;
	}

	public void setDisplayname(String displayname) {
		this.displayname = displayname;
	}

}